home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / Apple II / Essentials / Technical.Notes / IIGS / TN.IIGS.099 < prev    next >
Encoding:
Text File  |  1992-07-15  |  5.2 KB  |  117 lines  |  [TEXT/GEOL]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5. Apple IIgs
  6. #99: Supplemental Scrap Types
  7.  
  8. Revised by: Dave Lyons                                               May 1992
  9. Written by: Matt Deatherage & Matthew Reimer                     January 1991
  10.  
  11. This Technical Note describes public scrap types.
  12.  
  13. CHANGES SINCE MARCH 1991:  Added information on Scrap Type $8003 (Resource
  14. Reference Scrap); added a cross-reference to HyperCard IIgs Technical Note #3.
  15. _____________________________________________________________________________
  16.  
  17.  
  18. The Apple IIgs Toolbox Reference lists only two known scrap types--text
  19. ($0000) and pictures ($0001).  Other assigned scrap types are documented in
  20. this Note.  The format used to describe the scraps is similar to that used in
  21. File Type Notes, where the offsets, given in the form (+xxx), determine the
  22. offset from the beginning of the scrap handle.
  23.  
  24.  
  25. SAMPLED SOUND SCRAP (TYPE: $0002)
  26.  
  27. The following describes the Sampled Sound scrap format.  It consists of a
  28. ten-byte header followed by the sample data bytes.  This format is identical
  29. to the sampled sound resource format.
  30.  
  31. Format      (+000)  Word  This must always be zero.
  32. Wave Size   (+002)  Word  Sample size in pages (256 bytes per page).  For
  33.                           example, an 8K sample takes 32 pages; a 128K sample
  34.                           requires $200 pages.
  35. Rel Pitch   (+004)  Word  The high byte of this word is a semitone value; the
  36.                           low byte is a fractional semitone.  These values
  37.                           are used to tune the sample to correct pitch.  (See
  38.                           HyperCard IIgs Technical Note #3, Tuning Sampled
  39.                           Sounds.)
  40. Stereo      (+006)  Word  The output channel for this sound is in the low
  41.                            nibble of this word.
  42. Sample rate (+008)  Word  The sampling rate of the sound, in Hertz (Hz).
  43. Sound       (+010)  Bytes The sampled sound data.  The bytes are all 8-bit
  44.                           samples.  The sample starts here and continues
  45.                           until the end of the scrap.
  46.  
  47.  
  48. TEXTEDIT STYLE SCRAP (TYPE:  $0064)
  49.  
  50. The TextEdit Style Scrap format is the same as the TEFormat structure defined
  51. in Volume 3 of the Apple IIgs Toolbox Reference, which is also the same as the
  52. rStyleBlock resource format defined in the same volume.
  53.  
  54.  
  55. ICON SCRAP (TYPE: $4945)
  56.  
  57. The Icon scrap format is the same as the format for Finder Icon Data records,
  58. documented in detail in the File Type Note for File Type $CA, Finder Icon
  59. Files.  If there is more than one Icon Data record in a scrap, they are
  60. concatenated together with no intervening space.
  61.  
  62.  
  63. MASK SCRAP (TYPE: $8001)
  64.  
  65. The Mask scrap format is exactly the same as the PICT scrap ($0001) format,
  66. except that the pixel image the picture draws contains only zeroes and ones.
  67. When drawn, this picture creates a mask.  The mask has zeroes where the image
  68. can be seen through the mask, and ones where the mask does not allow the
  69. picture through.  When pasting a Mask scrap, initialize the destination bitmap
  70. to zero and draw the picture.
  71.  
  72. You can create the mask image by using regular QuickDraw II calls (using
  73. ovals, rectangles, etc.) or you can create it independently and include it
  74. with PaintPixels or other pixel map manipulation routines.
  75.  
  76.  
  77. COLOR TABLE SCRAP (TYPE: $8002)
  78.  
  79. The following describes the Color Table scrap format.  The scrap contains
  80. color tables so that applications can keep custom colors with pictures copied
  81. to the clipboard.  The scrap has the same format as the Apple Preferred Format
  82. picture PALETTES block:
  83.  
  84. NumColorTables   (+000)  Word    The count of the number of color tables in
  85.                                  the scrap
  86. ColorTableArray  (+002) 32 Bytes The color tables for the scrap.  There are
  87.                                  NumColorTables of them, each 32 bytes long.
  88.  
  89. RESOURCE REFERENCE SCRAP (TYPE: $8003)
  90.  
  91. The Resource Reference scrap is designed to allow resource editors to exchange
  92. resource data through an external scrap file using the Scrap Manager.
  93.  
  94. resScrapType  (+000)  Word    Type of resource (within the resScrapPath file)
  95. resScrapID    (+002)  Long    ID of resource (within the resScrapPath file)
  96. resScrapPath  (+006)  WString Full GS/OS class-one pathname to an extended
  97.                               file containing the specified resource.
  98.  
  99. If the specified resource contains references to other resources (for example,
  100. an rWindParam1 resource with a title string, control list, control templates,
  101. etc.), all the referenced resources must be present in the resScrapPath file.
  102.  
  103. It is the responsibility of the application using this scrap to handle
  104. resource ID conflicts that might arise from a Paste operation.  The
  105. application should not modify or destroy the resScrapPath file.
  106.  
  107.  
  108. Further Reference
  109. _____________________________________________________________________________
  110.  
  111.    o   Apple IIgs Toolbox Reference
  112.    o   HyperCard IIgs Technical Note #3, Tuning Sampled Sounds
  113.    o   File Type Note for file type $CA, all auxiliary types, Finder Icons
  114.        File
  115.    o   File Type Note for file type $C0, auxiliary type $0002, Apple
  116.        Preferred Format
  117.